package com.baitiaojun.auth.api;

import com.baitiaojun.api.domain.auth.UserRole;
import com.baitiaojun.api.exception.ConditionException;
import com.baitiaojun.api.vo.JsonRes;
import org.springframework.web.bind.annotation.*;

/**
 * @类名 AuthRoleApi
 * @描述 TODO
 * @作者 白条君
 * @创建日期 2022/12/7 20:54
 * @版本 1.0
 */
@RequestMapping("/auth")
public interface UserAuthoritiesApi {

    @GetMapping("/search-user-authorities")
    JsonRes getUserAuthorities() throws Exception;

    @GetMapping("/search-role-code")
    JsonRes getRoleCode(@RequestParam("userId") Long userId);

    @PostMapping("/new-default-role")
    JsonRes addDefaultRole(@RequestParam("userId") Long userId) throws ConditionException;
}